package allinpay.yun.demo.order;

import allinpay.yun.demo.IDemoHandler;
import org.json.JSONObject;

public class EntryGoodsHandler implements IDemoHandler {
    @Override
    public JSONObject getRequestParams() throws Exception {

        String bizGoodsNo = System.currentTimeMillis() + "splr";


        //标的信息
        JSONObject goodsParams = new JSONObject();
        goodsParams.put("amount", 10000);
        goodsParams.put("totalAmount", 11000);
        goodsParams.put("annualYield", 0.1);
        goodsParams.put("investmentHorizon", 12);
        goodsParams.put("investmentHorizonScale", 2);
        goodsParams.put("beginDate", "2015-11-16");
        goodsParams.put("endDate", "2015-11-17");
        goodsParams.put("repayPeriodNumber", 12);
        goodsParams.put("repayType", 1);
        goodsParams.put("guaranteeType", 1);

        JSONObject param = new JSONObject();
        param.put("bizUserId", "yunDemo001");
        param.put("goodsType", 1);
        param.put("bizGoodsNo", bizGoodsNo);
        param.put("goodsName", "标的1");
        param.put("goodsDetail", "我是标的1的详细信息。");
        param.put("goodsParams", goodsParams);
        param.put("showUrl", "showUrl");

        return param;
    }
}
